<?php
function smarty_function_jqbutton($params, $smarty) {
    $template = "jqbutton.tpl";
    $title = "Untitled";
    $inputparams = "";
    foreach ($params as $key=>$value) {
        if ($key == "title") {
            $title = $value;
        } else {
            $inputparams .= "$key=\"$value\" ";
        }
    }
    $smarty->assign("title", $title);
    $smarty->assign("params", $inputparams);
    return $smarty->fetch("plugins/$template");
}

?>
